import { createWebHistory, createRouter } from "vue-router";

import HomeView from "@/views/home/HomeView.vue";
import Login from "@/views/login/Login.vue";
import User from "../views/user/User.vue";
import Menu from "../views/menu/Menu.vue";

const routes = [
  { path: "/", redirect: "/login" },
  { path: "/login", component: Login },
  {
    path: "/home",
    component: HomeView,
    children: [
      {
        path: "/user",
        component: User,
      },
      {
        path: "/menu",
        component: Menu,
      },
      {
    path: '/logs',
    name: 'Logs',
    component: () => import('@/views/login/Login.vue') // 替换为实际组件路径
  }
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
